using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using Planisoft.DAO.Mapping;
using Planisoft.Entities;

namespace Planisoft.DAO
{
    public class BdPlanisoftContext : DbContext
    {
        static BdPlanisoftContext()
        {
            Database.SetInitializer<BdPlanisoftContext>(null);
        }

		public BdPlanisoftContext()
			: base("Name=BdPlanisoftContext")
		{
		}

        public DbSet<AreaTrabajo> AreaTrabajoes { get; set; }
        public DbSet<ConfiguraTrabajador> ConfiguraTrabajadors { get; set; }
        public DbSet<Contrato> Contratoes { get; set; }
        public DbSet<Dependiente> Dependientes { get; set; }
        public DbSet<EpsServiciosPropio> EpsServiciosPropios { get; set; }
        public DbSet<FinalizacionContrato> FinalizacionContratoes { get; set; }
        public DbSet<Nacionalidad> Nacionalidads { get; set; }
        public DbSet<NivelEducativo> NivelEducativoes { get; set; }
        public DbSet<Ocupacion> Ocupacions { get; set; }
        public DbSet<Parametro> Parametros { get; set; }
        public DbSet<PlanillaCabecera> PlanillaCabeceras { get; set; }
        public DbSet<PlantillaAporte> PlantillaAportes { get; set; }
        public DbSet<PlantillaDescuento> PlantillaDescuentoes { get; set; }
        public DbSet<PlantillaIngreso> PlantillaIngresoes { get; set; }
        public DbSet<Prestamo> Prestamoes { get; set; }
        public DbSet<RegimenPensionario> RegimenPensionarios { get; set; }
        public DbSet<SituacionContrato> SituacionContratoes { get; set; }
        public DbSet<sysdiagram> sysdiagrams { get; set; }
        public DbSet<TipoContrato> TipoContratoes { get; set; }
        public DbSet<TipoDocumentoId> TipoDocumentoIds { get; set; }
        public DbSet<TipoTrabajadorPensionista> TipoTrabajadorPensionistas { get; set; }
        public DbSet<Trabajador> Trabajadors { get; set; }
        public DbSet<UbigeoDepartamento> UbigeoDepartamentoes { get; set; }
        public DbSet<UbigeoDistrito> UbigeoDistritoes { get; set; }
        public DbSet<UbigeoProvincia> UbigeoProvincias { get; set; }
        public DbSet<UbigeoVia> UbigeoVias { get; set; }
        public DbSet<UbigeoZona> UbigeoZonas { get; set; }
        public DbSet<ValoresParametro> ValoresParametros { get; set; }
        public DbSet<ValoresRegPensionario> ValoresRegPensionarios { get; set; }
        public DbSet<IngresosPdtSunat> IngresosPdtSunats { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new AreaTrabajoMap());
            modelBuilder.Configurations.Add(new ConfiguraTrabajadorMap());
            modelBuilder.Configurations.Add(new ContratoMap());
            modelBuilder.Configurations.Add(new DependienteMap());
            modelBuilder.Configurations.Add(new EpsServiciosPropioMap());
            modelBuilder.Configurations.Add(new FinalizacionContratoMap());
            modelBuilder.Configurations.Add(new NacionalidadMap());
            modelBuilder.Configurations.Add(new NivelEducativoMap());
            modelBuilder.Configurations.Add(new OcupacionMap());
            modelBuilder.Configurations.Add(new ParametroMap());
            modelBuilder.Configurations.Add(new PlanillaCabeceraMap());
            modelBuilder.Configurations.Add(new PlantillaAporteMap());
            modelBuilder.Configurations.Add(new PlantillaDescuentoMap());
            modelBuilder.Configurations.Add(new PlantillaIngresoMap());
            modelBuilder.Configurations.Add(new PrestamoMap());
            modelBuilder.Configurations.Add(new RegimenPensionarioMap());
            modelBuilder.Configurations.Add(new SituacionContratoMap());
            modelBuilder.Configurations.Add(new sysdiagramMap());
            modelBuilder.Configurations.Add(new TipoContratoMap());
            modelBuilder.Configurations.Add(new TipoDocumentoIdMap());
            modelBuilder.Configurations.Add(new TipoTrabajadorPensionistaMap());
            modelBuilder.Configurations.Add(new TrabajadorMap());
            modelBuilder.Configurations.Add(new UbigeoDepartamentoMap());
            modelBuilder.Configurations.Add(new UbigeoDistritoMap());
            modelBuilder.Configurations.Add(new UbigeoProvinciaMap());
            modelBuilder.Configurations.Add(new UbigeoViaMap());
            modelBuilder.Configurations.Add(new UbigeoZonaMap());
            modelBuilder.Configurations.Add(new ValoresParametroMap());
            modelBuilder.Configurations.Add(new ValoresRegPensionarioMap());
            modelBuilder.Configurations.Add(new IngresosPdtSunatMap());
        }
    }
}
